<div class="collumns">
    <form action="?module=pages&action=page_save" method="post">

		{if isset($src) && $src}<input type="hidden" id="src" name="src" value="{$src}" />{/if}

		{if isset($errors) && count($errors)}
			<div class="errors">
				{foreach from=$errors item=error}
					{foreach from=$error item=_error}
						<div class="error">{$_error}</div>
					{/foreach}
				{/foreach}
			</div>
		{/if}

        <div class="collumn_2">
            {if $page->id}
                {include file="blocks_edit.html"}
        </div>
        <div class="collumn_2" id="page_data">
			<script type="text/javascript">
				$(document).ready(function(){
					$('#page_data .buttons').css('display', 'none');
					$('#page_data input, #page_data select, #page_data textarea').change(function(){
						$('#page_data .buttons').css('display', 'block');
					});
				});
			</script>
            {/if}
            <input type="hidden" name="page[id]" id="page_id" value="{$page->id}"/>

            <div class="row">
                <div style="text-align: center">
                    <img src="" id="tpl_image"/>
                </div>
                <label for="page_tpl">Шаблон</label>
                <select name="page[tpl]" id="page_tpl">
                    {foreach from=$tpl_list item=tpl}
                        <option {if $page->tpl == $tpl->id}selected="selected"{/if} value="{$tpl->id}">{$tpl->name}</option>
                    {/foreach}
                </select>
            </div>
            <div class="row">
                <label for="page_title">Название</label>
                <input type="text" name="page[title]" id="page_title" value="{$page->title}"/>
            </div>
            <div class="row">
                <label for="page_alias">Ссылка</label>
                <input type="text" name="page[alias]" id="page_alias" value="{$page->alias}"/>
            </div>
            <div class="row">
                <label for="page_meta">Дополнительные мета теги (html)</label>
                <textarea cols="" rows="" name="page[meta]" id="page_meta" >{/strip}{$page->meta}{strip}</textarea>
            </div>
            <div class="row">
                <label for="page_description">Описание страницы - description</label>
                <textarea cols="" rows="" name="page[description]" id="page_description" >{/strip}{$page->description}{strip}</textarea>
            </div>
            <div class="row">
                <label for="page_keywords">Ключевые слова страницы - keywords</label>
                <textarea cols="" rows="" name="page[keywords]" id="page_keywords" >{/strip}{$page->keywords}{strip}</textarea>
            </div>
			
			<div class="buttons">
				<input type="submit" value="Сохранить" class="save"/>
				<input type="submit" value="Применить" class="apply" name="apply"/>
				<input type="reset" value="Отменить" class="cancel" onclick="$('#page_data .buttons').css('display', 'none');"/>
			</div>
        </div>

		<div class="clear"></div>
    </form>
</div>